<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../resources/home/css/css.css" rel="stylesheet" type="text/css" />
<link href="../resources/home/css/common.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../resources/admin/easyui/easyui/1.3.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../resources/admin/easyui/css/wu.css" />
<link rel="stylesheet" type="text/css" href="../resources/admin/easyui/css/icon.css" />
<script src="../resources/home/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="../resources/home/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<script src="../resources/home/js/common_js.js" type="text/javascript"></script>
<script type="text/javascript" src="../resources/admin/easyui/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../resources/admin/easyui/easyui/1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../resources/admin/easyui/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
<title>用户登录</title>
</head>
<script type="text/javascript">

function submitLogin()
{
	if($("#username").val() == ''){
		$.messager.alert("消息提醒", "用户名不能为空!", "warning");
		return;
	}
	if($("#password").val() == ''){
		$.messager.alert("消息提醒", "密码不能为空!", "warning");
		return;
	}
	
	var data = $("#login_form").serialize();
	$.ajax({
		type: "post",
		url: "/TeaShop/home/login",
		data: data, 
		dataType: "json", //返回数据类型
		success: function(result){
			if(result.type == 'success'){
				
            	window.location.href = "/TeaShop/home/system/index";
			}
			else{
				$.messager.alert("消息提醒", result.msg, "warning");
			}
			
		}
		
	});
}

</script>
<body>
<!--顶部样式-->
<div class="common_top">
 <div class="Narrow">
  <div class=" left logo"><a href="/TeaShop/home/system/index"><img src="../resources/home/images/logo.png" /></a></div>
  <!--电话图层-->
  <div class="phone"><label>全国服务热线：</label><em>400-345-5633</em></div>
 </div>
</div>
<div class="login_bg">
<div class="login Narrow">
   <div class="login_advertising"><img src="../resources/home/images/bg_03.png" /></div>
  <div class="login_frame">
   <div class="login-form">
     <div class="login-name"><h1 class="name">用户登录</h1><span class="login_link"><a href="/TeaShop/home/register"><b></b>用户注册</a></span></div>
	  <!--提示信息-->
	    <div class="Prompt">账号密码不能为空！ </div>
	    <div class="form clearfix">
	     <form id="login_form" method="post">
		     <div class="item item-fore1"><label for="loginname" class="login-label name-label"></label><input id="username" name="username" type="text"  class="text" placeholder="请输入用户"/>
			 </div>
			 <div class="item item-fore2"><label for="nloginpwd" class="login-label pwd-label" ></label><input id="password" name="password" type="password"  class="text" placeholder="用户密码"/>
		     </div> 
	     </form>
	    </div>	
	    <div class="login-btn">
	    <a href="javascript:;" onclick="submitLogin();" class="btn_login">登&nbsp;&nbsp;&nbsp;&nbsp;录</a>
	  </div>
    </div>
    <div class="Login_Method">
     
    </div>
  </div>
</div>
</div>
<!--底部样式-->
 <div class="bottom_footer">
	 <p>Copyright©2014四川金祥保险销售有限公司.All Rights Reserved. </p>
	 <p>川ICP备09150084号</p>
   </div>
</body>
</html>
